<template>
  <div>
    <h1>个人信息页面</h1>
    {{id}}
  </div>
</template>

<script>
import axios from "axios";

export default {
  props:['id'],
  name: "UserProfile",
  beforeRouteEnter:(to, from, next) => {
    // 进入页面前加载数据
    // 此方法只可在beforeRouteEnter中使用
    next(vm => {
      vm.getData();
    })
    next();
  },
  methods: {
    getData: function (){
      // axios({
      //   method:'post',
      //   url:'localhost:9009/test/findAllUserList',
      //   headers:{
      //     'Content-type': 'application/x-www-form-urlencoded'
      //   }
      // }).then(function (response){
      //   console.log(response)
      // })
      axios.post("http://localhost:9009/test/findAllUserList",{

      })
      .then( res=>{
        console.log(res)
      })



    }
  }
}
</script>

<style scoped>

</style>
